<template> 
    <div class="top">
        <div class="title">
            <p>猫眼电影</p>
        </div>
        <nav class="top_nav">
      <router-link to="city" >城市</router-link> 
      <router-link to="/">热映</router-link>
      <router-link to="coming">待映</router-link>
    </nav>
    
        <div class="item">
        
        <div class="mtitle" v-for="(coming,index) in comingmovieList" :key="index">
            <img class="image" require :src="coming.img">
            {{coming.nm}}
            <div class="actor">主演：{{coming.star}}</div>
            <div class="showinfo">{{coming.showInfo}}</div>
            <div class="wish">{{coming.wish}}想看</div>
            <div class="buy">预售</div>
        </div>





        </div>





    </div>

   
</template>



<script lang="ts">
import Vue from 'vue'
import axios from 'axios';

export default {


    data(){
        return{
            active:2,
            comingmovieList:[],
        };
    },
    name:'ComingmoivesView.vue',
    components:{

    },

    methods:{


        getList()
        {
            axios
            .get("https://apis.netstart.cn/maoyan/index/comingList")
            .then((res) => {
                console.log(res);
                this.comingmovieList = res.data.coming;
                console.log(this.comingmovieList)
            })
        }
    },
    computed:{},

    created(){
        this.getList();
    }
    
}
</script>


<style >

.wish
{
     position: relative;
    display: flex;
    justify-content: center;
     float: right;
     color:rgb(240, 216, 81);
     font-size: 30px;
     font-weight: bold;
}


</style>